
<!--商户信息展示-->
<img src="../Public/Image/base.png" alt="暂无图片" id='StoreMain_Banner' onerror='this.src="../Public/Image/base.png"' style='width:100%;' />


<div id='StoreMain_Area'>
	<h2 style='text-align:center'>商户设置</h2>
	<div style='margin:10px auto;display:flex'>
		<div style='width:100px;text-align:right'>商户状态：</div>
		<div style='flex:1'  id='StoreMain_ViewStat'></div>
	</div>
	<div style='margin:10px auto;display:flex'>
		<div style='width:100px;;text-align:right'>归属地域：</div>
		<div style='flex:1' id='StoreMain_ViewCity'>柳河亨利粮油柳河亨利粮油柳河亨利粮油柳河亨利粮油柳河亨利粮油</div>
	</div>
	<div style='margin:10px auto;display:flex'>
		<div style='width:100px;text-align:right'>商户名称：</div>
		<div style='flex:1' id='StoreMain_ViewName'>柳河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油</div>
	</div>
	<div style='margin:10px auto;display:flex'>
		<div style='width:100px;;text-align:right'>联系电话：</div>
		<div style='flex:1' id='StoreMain_ViewPhone'>
			<div>13844552257</div>
			<div>13844552257</div>
		</div>
	</div>
	<div style='margin:10px auto;display:flex'>
		<div style='width:100px;text-align:right'>商户Q Q：</div>
		<div style='flex:1'  id='StoreMain_ViewQq'>32906802</div>
	</div>
	<div style='margin:10px auto;display:flex'>
		<div style='width:100px;;text-align:right'>商户微信：</div>
		<div style='flex:1' id='StoreMain_ViewWx'>lhhlly</div>
	</div>
	<div style='margin:10px auto;display:flex'>
		<div style='width:100px;;text-align:right'>商户地址：</div>
		<div style='flex:1' id='StoreMain_ViewAddr'>柳河亨利粮油柳河亨利粮油柳河亨利粮油柳河亨利粮油柳河亨利粮油</div>
	</div>
	<div style='margin:10px auto;display:flex'>
		<div style='width:100px;;text-align:right'>商户描述：</div>
		<div style='flex:1;word-break:break-all' id='StoreMain_ViewInfo'>柳河亨利河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油河亨利粮油粮油</div>
	</div>
	<div style='text-align:center;margin:20px auto'>
		<button  id='StoreMain_EditBtn'>编辑</button>
	</div>
</div>



<div id='StoreMain_StoreEdit'></div>


<script>


	//点击编辑
	$('#StoreMain_EditBtn').click(function(){
		$('#StoreMain_Area').hide();
		LoadStoreEdit();
	});

	//加载商户编辑页
	function LoadStoreEdit(){
		if($('#StoreMain_StoreEdit').html().length > 0){
			$('#StoreMain_StoreEdit').show();
			StoreEdit_PasrseStoreInfo(sessionStorage.StoreInfo);	//解析并显示商户信息
		}else{
			Ajax('',function(res){
				$('#StoreMain_StoreEdit').html(res).show();
			},'Template/StoreEdit.html');
		}
	}


	StoreMain_PasrseStoreInfo(sessionStorage.StoreInfo);	//解析并显示商户信息

	//解析并显示商户信息
	function StoreMain_PasrseStoreInfo(res){
		$('#StoreMain_Area').show();
		$('#StoreMain_StoreEdit').hide(); //隐藏编辑区域
		if(!/^{"id":.*$/.test(res)){
			return;
		}
		var info = JSON.parse(res);
		if(info.banner){
			$('#StoreMain_Banner').attr('src',upyun_shop_img+info.banner+'?a='+Math.random());
		}
		switch(info.stat){
			case 1:case '1':var stat_str='审核中';break;
			case 2:case '2':var stat_str='正常';break;
			case 3:case '3':var stat_str='未通过';break;
			case 4:case '4':var stat_str='已封禁';break;
		}
		$('#StoreMain_ViewName').text(ChangeChar(info.name,1));
		$('#StoreMain_ViewPhone').text(info.phone);
		$('#StoreMain_ViewQq').text(info.qq);
		$('#StoreMain_ViewWx').text(info.wx);
		$('#StoreMain_ViewAddr').text(ChangeChar(info.addr,1));
		$('#StoreMain_ViewInfo').text(ChangeChar(info.info,1));
		$('#StoreMain_ViewStat').text(stat_str);
		$('#StoreMain_ViewCity').text(info.full_city);
	}
</script>